/**
 * 后台全局配置
 * @author orange <1067357662@qq.com>
 */
const uuidv4 = require('uuid/v4')

const Config = {
    jwt: {
        secret: 'cade',
        expires: 86400000 // 1天
    },
    mysql: {
        host: 'www.simorp.top',
        port: 3306,
        database: 'com_ongsat',
        username: 'com_ongsat',
        // password: 'tdcq1998.@@',
        password: 'XpGwRLPDcRMi7ZTX',
        pool: {
            max: 30,
            min: 5,
            acquire: 30000,
            idle: 10000
        },
        define: {
            underscored: true,
            charset: 'utf8mb4',
            hooks: {
                beforeCreate: po => {
                    po.id = uuidv4()
                }
            }
        }
    }
}

module.exports = Config
